<?php

namespace app\api\validate;

use think\Validate;

class Car extends Validate
{
    protected $rule = [
        ['id',             'require',                   '请先选择座驾'],
        ['expire',         'require|number|in:0,1,2',   '选择时长套餐|选择时长套餐|选择时长套餐'],
        ['method',         'require|number|in:1,2,3',   '选择支付类型|选择支付类型|选择支付类型'],
        ['page',           'number|>=:0',           '当前页出错|当前页出错'],
    ];

    protected $scene = [
        'buy'         => ['id', 'expire', 'method'],
        'myCar'       => ['page'],
    ];
}
